<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html>
<html>
   <head>
    	<title></title>   
		<s:include value="../../common/source.jsp"></s:include>
		<script src="js/member.js"></script>
			
  </head>
  <body>
   <div class="body">
          <div class="content ui-sortable">
          <div class="list">
        获奖列表
           </div>
           </div>
 	<br/>
 	 <!-- 打印报表 -->
 	  <div class="load0">
        <form action="teacher/excelCountAwa.action" method="post">
        <input type="hidden" name="name" value=${name }>
        <input type="hidden" name="flag" value=${flag }>
        <input type="hidden" name="date1" value=${date11 }>
        <input type="hidden" name="date2" value=${date22 }>
        <input type="submit" class="sui-btn btn-primary"  value="下载Excel">
        </form> 
         </div>
 	 
            <!--关键词搜索结束-->
       <!--按年份搜索开始--> 
              
           <br>	
        <hr style="background-color:#cfe1f9;height:1px;"/>         
    <table class="sui-table table-primary table-sideheader ta-width">
          <thead>
            <tr>
              <th style="width:5%;text-align:center">序号</th>
              <th style="width:26%" >获奖名称</th>
              <th style="width:26%">获奖项目名称</th>            
              <th style="width:8%">获奖等级</th>
              <th style="width:6%">完成人</th>
              <th style="width:8%">获奖日期</th> 
              <th style="width:8%">审核状态</th>
              <th style="width:5%">下载</th>           
            <th style="width:8%">操作</th>
            </tr>
          </thead>
          <tbody>
          <s:iterator value="awards"> 
            <tr>
              <td style="text-align:center"></td>
              <td><s:property value="name"/></td>
              <td><s:property value="projectName"/></td>
              <td><s:property value="level"/></td>
              <td><s:property value="people"/></td>
              <td><s:property value="date"/></td>
              <td>  
               <s:if test="state==0">未审核</s:if>
               <s:elseif test="state==1"><span style="color:red">被驳回</span></s:elseif>
               <s:else><span style="color:blue">审核中</span></s:else>
              </td>
              <td><a href="teacher/down.action?nameCom=<s:property value="upload"/>">下载</a></td>   
              <td>
              <s:if test="state==0">
              <form action="teacher/deleteAwa.action?awardid=<s:property value="awaId"/>" onsubmit="return firm()" method="post">
           <button type="submit">删除</button>
           </form>
              </s:if>
              <s:elseif test="state==1">
              <form action="teacher/deleteAwa.action?awardid=<s:property value="awaId"/>" onsubmit="return firm()" method="post">
             <button type="submit">删除</button>
              </form>
              </s:elseif>
                 <s:else>删除</s:else>
              
              <s:if test="state==0">
                 <a href="teacher/modifyAwa.action?awardId=<s:property value="awaId"/>">修改</a>
                 </s:if>
                 <s:elseif test="state==1">
                 <a href="teacher/modifyAwa.action?awardId=<s:property value="awaId"/>">修改重传</a>
                 </s:elseif></td>
              </tr>
          </s:iterator>
          </tbody>
        </table>
        <div align="center" style="font-size: 12px">
                               <s:if test="#request.page.totalCount==0">                            
                               对不起，你所查找的数据条数为0！
                               </s:if>
							<s:if test="#request.page.hasPrePage">
							    <s:if test="#request.flag==1">
							    <a href="teacher/searchAwaTime.action?currentPage=1&&date1=${date111 }&&date2=${date222 }">首页</a> | 
								<a href="teacher/searchAwaTime.action?currentPage=${page.currentPage -1 }&&date1=${date111 }&&date2=${date222 }">上一页</a>
							    </s:if>
							    <s:elseif test="#request.flag==2" >
							     <a href="teacher/searchAwa.action?currentPage=1&&vague=${name11 }&&method=get">首页</a> | 
								<a href="teacher/searchAwa.action?currentPage=${page.currentPage -1 }&&vague=${name11 }&&method=get">上一页</a>
							    </s:elseif >
							    <s:else>
								<a href="teacher/listAwa.action?currentPage=1">首页</a> | 
								<a href="teacher/listAwa.action?currentPage=${page.currentPage -1 }">上一页</a>
							    </s:else>
							</s:if>
							<s:else>
							
							</s:else>
							<s:if test="#request.page.hasNextPage">
							    <s:if test="#request.flag==1">
								<a href="teacher/searchAwaTime.action?currentPage=${page.currentPage + 1 }&&date1=${date111 }&&date2=${date222 }">下一页</a> | 
								<a href="teacher/searchAwaTime.action?currentPage=${page.totalPage }&&date1=${date111 }&&date2=${date222 }">尾页</a>
								</s:if>
								<s:elseif test="#request.flag==2">
								<a href="teacher/searchAwa.action?currentPage=${page.currentPage + 1 }&&vague=${name11 }&&method=get">下一页</a> | 
								<a href="teacher/searchAwa.action?currentPage=${page.totalPage }&&vague=${name11 }&&method=get">尾页</a>
								</s:elseif>
							    <s:else>
								<a href="teacher/listAwa.action?currentPage=${page.currentPage + 1 }">下一页</a> | 
								<a href="teacher/listAwa.action?currentPage=${page.totalPage }">尾页</a>
								</s:else>
							</s:if>
							<s:else>
							
							</s:else>
						</div>	
       </div>
  </body>
  
  <!-- ****************日期显示******************** -->
  <script>
  if("<s:property value="suc"/>"=="success"){
alert("删除成功！！！");
}else if("<s:property value="suc"/>"=="success2"){
 alert("内容修改成功！！！");
 }
  </script>
  
        <script type="text/javascript">

	    var d = new Date();
		var date = d.getFullYear();
		var uu=document.getElementById("menu4");
		var tt=document.getElementById("menu6");
		var aa=uu.getElementsByTagName("a");
		var bb=tt.getElementsByTagName("a");
		
		   for(var i=0; i<aa.length;i++) 
		   {
		   	aa[i].innerHTML=date;
		   	//aa[i].value=date;a
		   	aa[i].setAttribute('value', date);
		   	date--;
		   } 
		   var date = d.getFullYear();
		   for(var i=0; i<bb.length;i++) 
		   {
		   	bb[i].innerHTML=date;
		   	bb[i].setAttribute('value',date);
		   	date--;
		   	aa[i].value=date;
		   } 
		   
    
        </script>
        <script>
        function del()
        {
          alert("删除成功！");
        }
        </script>
</html>